plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.3'
    id 'io.spring.dependency-management' version '1.1.4'
}

group = 'ru.dvfu.ctf'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '21'
}

jar {
    enabled = false
}

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

ext.springdocOpenApiVersion = "2.4.0"
ext.projectLombockVersion = "1.18.30"
ext.liquibaseCoreVersion = "4.24.0"
ext.h2DatabaseVersion = "2.2.224"

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-actuator"
    implementation "org.springframework.boot:spring-boot-starter-data-jpa"
    implementation "org.springframework.boot:spring-boot-starter-security"
    implementation "org.springframework.boot:spring-boot-starter-web"
    implementation "org.springframework.boot:spring-boot-starter-webflux"
    implementation "org.springframework.boot:spring-boot-starter-validation"
    implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocOpenApiVersion}"
    implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:${springdocOpenApiVersion}"
    implementation "org.liquibase:liquibase-core:${liquibaseCoreVersion}"
    compileOnly "org.projectlombok:lombok:${projectLombockVersion}"
    runtimeOnly "com.h2database:h2:${h2DatabaseVersion}"
    annotationProcessor "org.projectlombok:lombok:${projectLombockVersion}"
    testImplementation "org.springframework.boot:spring-boot-starter-test"
    testImplementation "org.springframework.security:spring-security-test"
}

tasks.named('test') {
    useJUnitPlatform()
}
